package de.gameduell.framework.asset {
	import flash.events.Event;	
	
	public class AssetEvent extends Event {

		public static const COMPLETE:String   = "complete";
		public static const PROGRESS:String   = "progress";
		public static const LOAD_ERROR:String = "loadError";
		
		private var _asset:IAsset;
		
		public function AssetEvent(type:String, aAsset:IAsset, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			_asset = aAsset;		
		}
				
		public function get asset():IAsset{
			return _asset;
		}
		
		override public function clone():Event {
			var clonedEvent:AssetEvent = new AssetEvent(type, asset, bubbles, cancelable);
			return clonedEvent;
		}
	}
}
